import { defineStore } from 'pinia'

export const useFileSelectionStore = defineStore('fileSelection', {
  state: () => ({
    // 左发
    selectedFileA: '',
    selectedFileB: '',
    // 右发
    selectedFileC: '',
    selectedFileD: ''
  }),

  actions: {
    // 更新左发A通道选择
    updateFileA(fileName: string) {
      this.selectedFileA = fileName
    },
    // 更新左发B通道选择
    updateFileB(fileName: string) {
      this.selectedFileB = fileName
    },
    // 更新右发A通道选择
    updateFileC(fileName: string) {
      this.selectedFileC = fileName
    },
    // 更新右发B通道选择
    updateFileD(fileName: string) {
      this.selectedFileD = fileName
    },
    // 重置所有选择
    resetSelections() {
      this.selectedFileA = ''
      this.selectedFileB = ''
      this.selectedFileC = ''
      this.selectedFileD = ''
    }
  },

  
})
